<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	</head>
<body>
<pre>
Dear Sir./Ms. ${userName}

You just placed an order, order id is ${order.id?string("0")}
Following are the item(s) you have ordered.
</pre>
<table style="border-collapse: collapse;">
	<tr>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Book Name</th>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Unit Price</th>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Quantity</th>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Total</th>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Inventory Status</th>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Inventory Quantity</th>
	</tr>
	<#list order.orderItems as item>
		<tr>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.orderedBook.name}</td>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.orderedBook.unitPrice}</td>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.quantity}</td>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.unitPrice}</td>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.orderedBook.inventory.status}</td>
			<td style="border-bottom: 1px solid #DDDDDD;">${item.orderedBook.inventory.availableQuantity}</td>
		</tr>
	</#list>
</table>
<table>
	<tr>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Delivery Fee</th>
		<td style="border-bottom: 1px solid #DDDDDD;">$${order.deliveryFee}</td>
	</tr>
	<tr>
		<th style="text-align: left; border-bottom: 1px solid #DDDDDD;">Total Price</th>
		<td style="border-bottom: 1px solid #DDDDDD;">$${order.price}</td>
	</tr>
</table>
<#if order.status == "WAIT_FOR_REPLENISHMENT">
<font style="color:red;">
<pre>
NOTICE:
Some item(s) put in this order are wait for replenishment, we will send all the item(s) you have ordered while they are all ready!!
</pre>
</font>
</#if>

best regards
</body>
</html>